//
//  PersonInfoCell.m
//  HxgProject
//
//  Created by hxg on 2018/3/7.
//  Copyright © 2018年 XMYY-19. All rights reserved.
//

#import "PersonInfoCell.h"

@implementation PersonInfoCell


-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self)
    {
        [self setUpUI];
    }
    return self;
}

- (void)setUpUI
{
    [self.contentView addSubview:self.autherNameLbl];
    [self.autherNameLbl makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.equalTo(self.contentView.mas_centerY);
        make.left.equalTo(self.contentView.mas_left).offset(20.0f);
    }];
    
    [self.contentView addSubview:self.autherContentLbl];
    self.autherContentLbl.hidden = YES;
    [self.autherContentLbl makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.equalTo(self.contentView.mas_centerY);
        make.right.equalTo(self.contentView.mas_right).offset(-10.0f);
    }];
    
    
    [self.contentView addSubview:self.autherContentField];
    self.autherContentField.placeholder = @"请输入信息";
    [self.autherContentField makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.equalTo(self.contentView.mas_centerY);
        make.right.equalTo(self.contentView.mas_right).offset(-10.0f);
        make.size.mas_equalTo(CGSizeMake(self.frame.size.width/2, 12.0f));
    }];
    
}

#pragma mark
- (UILabel *)autherNameLbl
{
    if (!_autherNameLbl)
    {
        _autherNameLbl = [[UILabel alloc] init];
        _autherNameLbl.font = [UIFont systemFontOfSize:12.0f];
    }
    return _autherNameLbl;
}

-(UILabel *)autherContentLbl
{
    if (!_autherContentLbl)
    {
        _autherContentLbl = [[UILabel alloc] init];
        _autherContentLbl.font = [UIFont systemFontOfSize:12.0f];
        _autherContentLbl.textColor = [UIColor lightGrayColor];
    }
    return _autherContentLbl;
}

- (UITextField *)autherContentField{
    
    if (!_autherContentField)
    {
        _autherContentField = [[UITextField alloc] init];
        _autherContentField.font = [UIFont systemFontOfSize:12.0f];
        _autherContentField.textAlignment = NSTextAlignmentRight;
    }
    return _autherContentField;
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
